﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Croxweb.Leuphana.Services.StorageService
{
    public interface IStateStore
    {
        /// <summary>
        /// Save an object to the applications state for reuse after suspension.
        /// </summary>
        /// <param name="key">Identifier.</param>
        /// <param name="Value">Object to be stored.</param>
        void Save(String key, Object Value);

        /// <summary>
        /// Get an object from the applications state.
        /// </summary>
        /// <typeparam name="T">Stored objects type.</typeparam>
        /// <param name="key">Identifier.</param>
        /// <returns>Stored object or empty value.</returns>
        T Load<T>(String key);
    }
}
